package com.ymttest.database.sqlwapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtCouponTradeRecord;
import com.ymttest.utils.EnvSetup;

public class YmtCouponTradeRecordWapper {
	  SqlManager manager;

	    public YmtCouponTradeRecordWapper() {
	        manager = new SqlManager("ymt" + EnvSetup.getEnv());
	    }

	    public List<YmtCouponTradeRecord> selectByOrderIdAndCouponCode(Integer orderId, String couponCode) {
	    	 Map m = new HashMap();
	         m.put("couponCode", couponCode);
	         m.put("orderId", orderId);
	         List<YmtCouponTradeRecord> result = manager
	                 .getSelectResults(
	                         "com.ymttest.database.mapping.YmtCouponTradeRecordMapper.selectByOrderIdAndCouponCode",
	                         m);
	         manager.commit();
	        return result;
	    }
}
